/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package AWT;

import java.awt.Button;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Panel;

/**
 *
 * @author gurrola
 */
public class Ejercicio_Paneles {

    public static void main(String args[]){

         Frame f = new Frame();

         Button b1 = new Button("1");     Button b2 = new Button("2");      Button b3 = new Button("3");
         Button b4 = new Button("4");     Button b5 = new Button("5");      Button b6 = new Button("6");
         Button b7 = new Button("7");     Button b8 = new Button("8");      Button b9 = new Button("9");
         Button b10 = new Button("10");   Button b11 = new Button("11");    Button b12 = new Button("12");
         Button b13 = new Button("13");   Button b14 = new Button("14");    Button b15 = new Button("15");
         Button b16 = new Button("16");   Button b17 = new Button("17");    Button b18 = new Button("18");
         Button b19 = new Button("19");   Button b20 = new Button("20");    Button b21 = new Button("21");
         Button b22 = new Button("22");   Button b23 = new Button("23");    Button b24 = new Button("24");
         Button b25 = new Button("25");   Button b26 = new Button("26");    Button b27 = new Button("27");
         Button b28 = new Button("28");   Button b29 = new Button("29");    Button b30 = new Button("30");
         Button b31 = new Button("31");   Button b32 = new Button("32");    Button b33 = new Button("33");
         Button b34 = new Button("34");   Button b35 = new Button("35");    Button b36 = new Button("36");
         Button b37 = new Button("37");   Button b38 = new Button("38");    Button b39 = new Button("39");
         Button b40 = new Button("40");   Button b41 = new Button("41");    Button b42 = new Button("42");
         Button b43 = new Button("43");   Button b44 = new Button("44");    Button b45 = new Button("45");
         Button b46 = new Button("46");   Button b47 = new Button("47");    Button b48 = new Button("48");
         Button b49 = new Button("49");   Button b50 = new Button("50");    Button b51 = new Button("51");
         Button b52 = new Button("52");   Button b53 = new Button("53");    Button b54 = new Button("54");
         Button b55 = new Button("55");   Button b56 = new Button("56");    Button b57 = new Button("57");
         
         f.setLayout(new GridLayout(4, 4));

         Panel p1 = new Panel(new GridLayout(2,2));
         p1.add(b1); p1.add(b2); p1.add(b3);  p1.add(b4);
         f.add(p1);

         Panel p2 = new Panel (new GridLayout(2, 1));
         p2.add(b5); p2.add(b6);
         f.add(p2);

         Panel p3 = new Panel(new GridLayout(3, 1));
         p3.add(b7); p3.add(b8); p3.add(b9);
         f.add(p3);

         Panel p4 = new Panel(new GridLayout(2, 2));
         p4.add(b10); p4.add(b11); p4.add(b12); p4.add(b13);
         f.add(p4);

         Panel p5 = new Panel(new GridLayout(3, 1));
         p5.add(b14); p5.add(b15); p5.add(b16);
         f.add(p5);

         Panel p6 = new Panel(new GridLayout(1, 4));
         p6.add(b17); p6.add(b18); p6.add(b19); p6.add(b20); 
         f.add(p6);
         
         Panel p7 = new Panel(new GridLayout(1, 4));
         p7.add(b21); p7.add(b22); p7.add(b23); p7.add(b24);
         f.add(p7);
         
         Panel p8 = new Panel(new GridLayout(3, 1));    
         p8.add(b25); p8.add(b26); p8.add(b27);
         f.add(p8);

         Panel p9 = new Panel(new GridLayout(1, 2));
         p9.add(b28); p9.add(b29);
         f.add(p9);
         
         Panel p10 = new Panel(new GridLayout(3, 1));     
         p10.add(b30); p10.add(b31); p10.add(b32);
         f.add(p10);

         Panel p11 = new Panel(new GridLayout(3, 1));
         p11.add(b33); p11.add(b34); p11.add(b35);
         f.add(p11);
         
         Panel p12 = new Panel(new GridLayout(1, 2));
         p12.add(b36); p12.add(b37);
         f.add(p12);

         Panel p13 = new Panel(new GridLayout(1, 2));
         p13.add(b38); p13.add(b39);
         f.add(p13);

         Panel p14 = new Panel( new GridLayout(3, 3));
         
         Panel p14A = new Panel(new GridLayout(1, 3));
         p14A.add(b40); p14A.add(b41); p14A.add(b42);
         p14.add(p14A);
         f.add(p14);

         Panel p14B = new Panel(new GridLayout(1, 2));
         p14B.add(b43); p14B.add(b44);
         p14.add(p14B);
         f.add(p14);

         Panel p14C = new Panel(new GridLayout(1, 3));
         p14C.add(b45); p14C.add(b46); p14C.add(b47);
         p14.add(p14C);
         f.add(p14);

         Panel p15 = new Panel( new GridLayout(3, 3));

         Panel p15A = new Panel(new GridLayout(1, 3));
         p15A.add(b48); p15A.add(b49); p15A.add(b50);
         p15.add(p15A);
         f.add(p15);

         Panel p15B = new Panel(new GridLayout(1, 2));
         p15B.add(b51); p15B.add(b52);
         p15.add(p15B);
         f.add(p15);

         Panel p15C = new Panel(new GridLayout(1, 3));
         p15C.add(b53); p15C.add(b54); p15C.add(b55);
         p15.add(p15C);
         f.add(p15);
         
         Panel p16 = new Panel(new GridLayout(1, 2));
         p16.add(b56); p16.add(b57);
         f.add(p16);

         f.setVisible(true);
         f.setSize(500, 500);


    }

}
